 <%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新增装修审核项目</title>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/ajaxException.js"></script>
<%@ include file="/commons/validation.jsp"%>
<script type="text/javascript">
	function submitForm(){
		var flag =	$("addForm").fireEvent("onsubmit");
		if(!flag) return;
		$("addForm").submit();
	}
/***************选择人*****************/
	function openSelectPerson(){ //打开选人的界面
	  	var url = "${ctx}/common_employeeQuery.do?method=initSelectPsrsonMain";
	  	url += "&frameName=addFrame";
	  	url += "&callBack=setPersonInfo";
	  	url += "&multiple=false";
		top.windowOpen(url, "selectPerson", "选人", 530, 700,true,"selectPerson");
	}
	function setPersonInfo(info){ //设置选人信息
		var personInfos = info.split(";");
		for(var i = 0; i < personInfos.length; i++){
			var temp = personInfos[0].split(",");
			$("employeeId").value= temp[0];
			$("employeeName").value = temp[1];
			setJob(temp[0]);
		}
	}
	function setJob(employeeId){
		var url = "${ctx}/system_fitmentApproveSetupAction.do?method=getJob";
		var params = "employeeId=" + employeeId;
		sendAjaxRequest(url,params,function(result){
			ajaxSubmitException(result.responseText);
			$("showJob").innerText = result.responseText;
			$("job").value = result.responseText;
		});
	}

	function flushList(){
		findFrame("renovationFrame").flushList();
	}
</script>
</head>

<body>
<iframe id="showFrame" name="showFrame" style="display:none"></iframe>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td class="window_head_outBg"><table border="0" cellpadding="0" cellspacing="0">
      <tr>
	        <td>
	        	<img src="${ctx}/images/ico_Advance.gif" width="16" height="16" align="absmiddle" />
	        	<span class="window_head_intext">装修一级审批</span>
	        </td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td class="aux_header_line_1"></td>
  </tr>
  <tr>
    <td class="aux_header_line_2"></td>
  </tr>
  <tr>
    <td class="content">
    	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
      	<form id="addForm" name="addForm"  method="post" class="required-validate" target="showFrame"
      		  action="${ctx}/system_fitmentApproveSetupAction.do?method=addEmployee2Cache">
        <td class="aux_outtable_color">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="aux_intable_color">
          <tr>
            <td class="aux_intable_td1">姓 名：</td>
            <td class="aux_intable_require"><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td>
                  	<input id="employeeName" name="employeeName" type="text" maxlength="36" readonly="readonly"
                  			class="inputtext validate-char required"  size="16" value=""/>

                  	<input type="hidden" id="employeeId" name="employeeId" value="">
                  	<input type="hidden" id="second_employeeId" name="second_employeeId" value="${second_employeeId}">
                  </td>
                  <td width="4">&nbsp;</td>
                  <td>
                  	<a href="#"  onClick="openSelectPerson();" onFocus="this.blur()">
                  		<img src="${ctx}/images/ico_cz.gif" width="16" height="16" border="0" />
                  	</a>
                  </td>
                </tr>
              </table></td>
          </tr>
          <tr>
            <td class="aux_intable_td1">职 位：</td>
            <td class="aux_intable_td2">
            	<span id="showJob"></span>
            	<input id="job" name="job" type="hidden" value="">
            </td>
          </tr>

        </table></td>
        </form>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td class="window_footer"><table border="0" cellspacing="0" cellpadding="0">

	  <tr>
        <td>
        <table border="0" cellpadding="0" cellspacing="0">
          <tr>
        	<td class="btn_between_space"></td>
            <td class="buttonOffLeft" id="btn1_21"></td>
     		<td class="buttonOffMiddle" id="btn1_22"
     			onClick="submitForm();"
     			onMouseOver="btn_change_over(2)"
     			onMouseOut="btn_change_out(2)"
     			onBlur="btn_change(2)">
     			<img src="${ctx}/images/ico_ok.gif" alt="" width="14" height="14" border="0" align="absbottom" />
     			确  定</td>
            <td class="buttonOffRight" id="btn1_23"></td>
          </tr>
          </table></td>
          <td class="btn_between_space"></td>
          <td><table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td class="buttonOffLeft" id="btn1_31"></td>
                <td class="buttonOffMiddle" id="btn1_32"
                	onClick="windowClose();"
                	onMouseOver="btn_change_over(3)"
                	onMouseOut="btn_change_out(3)"
                	onBlur="btn_change(3)">

                	<img src="${ctx}/images/ico_cancel.gif" alt="" width="14" height="14" border="0" align="absbottom" />
                	关 闭
                </td>
                <td class="buttonOffRight" id="btn1_33"></td>
              </tr>
          </table></td>
        </tr>
    </table>
    <p>&nbsp;</p></td>
  </tr>
</table>
</body>
</html>